<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>

<!-- <div id="lx_company_test"></div>
<input type="text" id="company">
<div id="lx_company"></div> -->

<div style="position: relative;">
	<div class="l-text-wrapper">
		<div class="l-text l-text-combobox">
			<input type="text" id="companyName" name="companyName" class="l-text-field"   style="height: 20px;">
			<input type="hidden" id="company" name="company" class="l-text-field"  >
		</div>
	</div>
	<div  style="width: 200px; cursor: e-resize; left: 0; top: 23px; display: none;" id="lx_company_div">
		<div  >
			<table cellpadding="0" cellspacing="0" border="0"   id="lx_company">
			</table>
		</div>
	</div>
</div>

<script language="javascript">
<!--
	
	
	//点击公司名称事件
	function clickCompanyName(self,id){
		$("#companyName").val($(self).text());
		$("#company").val(id);
		$("#lx_company").html("");
		$("#lx_company_div").css("display","none");
		window.location.href="/fartist.htm?school="+id;
	}
	
	
	$(function(){
		$("#companyName").keyup(function(){
			var name = $.trim($("#companyName").val());
			$("#lx_company_test").html(name);
			if (name == "") {
				$("#lx_company").html("");
				return;
			}
			$.post("/school.htm", {
				name : name
			}, function(data) {
				if(data.length>0){
					$("#lx_company_div").css("display","block");
				}
				$("#lx_company").html("");
				$.each(data, function(i) {
					$("#lx_company").append("<tr><td align='left' onclick='clickCompanyName(this,"+data[i].id+")'>"+ "<a href=#'>"+data[i].name+ "</a>" + "</td></tr>");
				});
			}, 'json');
		});
	})
//-->
</script>